package com.stylefeng.guns.modular.system.model;

import com.alipay.api.internal.util.StringUtils;
import com.baomidou.mybatisplus.enums.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import jdk.nashorn.internal.ir.annotations.Ignore;

import java.io.Serializable;

/**
 * <p>
 * 设置表
 * </p>
 *
 * @author kutty
 * @since 2018-09-25
 */
@TableName("ali_setup")
public class Setup extends Model<Setup> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 成功数
     */
    @TableField("success_num")
    private Integer successNum;
    /**
     * 失败数
     */
    @TableField("fail_num")
    private Integer failNum;
    /**
     * 支付中
     */
    @TableField("paying_num")
    private Integer payingNum;
    /**
     * 金额
     */
    private String money;
    /**
     * 备注
     */
    private String remark;
    /**
     * 排序
     */
    @TableField("order_by")
    private Integer orderBy;
    /**
     * 账号
     */
    private String account;
    /**
     * 是否已经停用（1使用2停用）
     */
    @TableField("is_use")
    private Integer isUse;
    /**
     * 支付宝appid
     */
    private String appid;
    /**
     * 私钥
     */
    @TableField("rsa_primary_key")
    private String rsaPrimaryKey;
    /**
     * 时间
     */
    private Date date;
    /**
     * 支付宝公钥
     */
    @TableField("ali_public_key")
    private String aliPublicKey;
    /**
     * 应用公钥
     */
    @TableField("ali_app_key")
    private String aliAppKey;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getSuccessNum() {
        return successNum;
    }

    public void setSuccessNum(Integer successNum) {
        this.successNum = successNum;
    }

    public Integer getFailNum() {
        return failNum;
    }

    public void setFailNum(Integer failNum) {
        this.failNum = failNum;
    }

    public Integer getPayingNum() {
        return payingNum;
    }

    public void setPayingNum(Integer payingNum) {
        this.payingNum = payingNum;
    }

    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(Integer orderBy) {
        this.orderBy = orderBy;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public Integer getIsUse() {
        return isUse;
    }

    public void setIsUse(Integer isUse) {
        this.isUse = isUse;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getRsaPrimaryKey() {
        return rsaPrimaryKey;
    }

    public void setRsaPrimaryKey(String rsaPrimaryKey) {
        this.rsaPrimaryKey = rsaPrimaryKey;
    }

    public Date getDate() {
        if(date==null){
            return new Date();
        }
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getAliPublicKey() {
        return aliPublicKey;
    }

    public void setAliPublicKey(String aliPublicKey) {
        this.aliPublicKey = aliPublicKey;
    }

    public String getAliAppKey() {
        return aliAppKey;
    }

    public void setAliAppKey(String aliAppKey) {
        this.aliAppKey = aliAppKey;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Setup{" +
                "id=" + id +
                ", successNum=" + successNum +
                ", failNum=" + failNum +
                ", payingNum=" + payingNum +
                ", money=" + money +
                ", remark=" + remark +
                ", orderBy=" + orderBy +
                ", account=" + account +
                ", isUse=" + isUse +
                ", appid=" + appid +
                ", rsaPrimaryKey=" + rsaPrimaryKey +
                ", date=" + date +
                ", aliPublicKey=" + aliPublicKey +
                ", aliAppKey=" + aliAppKey +
                "}";
    }
}
